home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 8: LINUX Games
/
Linux Cubed Series 8 - LINUX Games.iso
/
games
/
strategy
/
vga_card.000
/
vga_cardgames-1.3.1.tar
/
vga_cardgames
/
common.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-02-26
|
573b
|
44 lines
/*
* Card games
*
* Copyright (C) Evan Harris, 1994, 1995.
*
* Permission is granted to freely redistribute and modify this code,
* providing the author(s) get credit for having written it.
*/
#include <stdlib.h>
#include <time.h>
#include <vga.h>
#include "common.h"
void
EndDisplay()
{
vga_setmode(TEXT);
#if defined(CARDSMOUSE)
mouse_close();
#endif
}
void
InitRandom(unsigned char state)
{
static long seed;
if (state == NEW) {
seed = time(NULL);
}
srand48(seed);
}
long
Random(long max)
{
return lrand48() % max;
}